{$header}
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">新增批发销售明细 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>
<php>
    $sale = M('Wholesale')->where('id = '.$_GET['id'])->find();
</php>
<form class="form-horizontal well" method='post' id="form1" name="form1" action="__URL__/insert/">
<table cellpadding=3 cellspacing=3 >
<tr>
	<td class="tRight" >销售单号：</td>
	<td class="tLeft" >
		<input type="hidden" name="wholesale_id" value="{$_GET.id}">
		<input type="hidden" name="wholesale_no" value="{$sale.wholesale_no}">
        <input type="hidden" name="jumpUrl" value="__APP__/Wholesale/edit/id/{$_GET.id}">
            {$sale.wholesale_no}  &nbsp;&nbsp; 仓库:{$sale.warehouse_id|getModelName=Warehouse}
            
        </td>
</tr>
<tr>
	<td class="tRight" >经办人：</td>
	<td class="tLeft" >
            {$sale.user_id|getModelName='User'}&nbsp;&nbsp; &nbsp;&nbsp;创建时间：{$sale.create_time|toDate}
        </td>
</tr>
<tr><td>客户</td><td>
     <input type="hidden" name="customer_id" value="{$sale.customer_id}" >
    {$sale.customer_id|getModelName='Customer'} (来源：{$sale.wholesale_source_id|getConfigVal='wholesale_source'}) </td> </tr>
<tr>
	<td class="tRight" >备注:</td>
	<td class="tLeft" >
            {$sale.remark}
        </td>
</tr>
<tr>
    <td class="tRight" width="150px">按<b>条码</b>查询产品：</td>
	<td class="tLeft" >
            <input id="ptm" name="ptm_id" style="width:700px">
            <br/><a class="btn btn-primary" href="javascript:void(0)" onclick="showdetail('ptm','wholesale');">添加产品</a>
        </td>
</tr>
<tr>
	<td class="tRight" >按<b>拼音首字母</b>查询产品：</td>
	<td class="tLeft" >
            <input id="ppy" name="ppy_id" style="width:700px">
            <br/><a class="btn btn-primary" href="javascript:void(0)" onclick="showdetail('ppy','wholesale');">添加产品</a>
        </td>
</tr>
<tr>
    <td class="tRight" >按<b>汉字</b>查询产品：</td>
    <td class="tLeft" >
            <div class="input-append">
                <input id="q" name="q" class="input-xlarge search-query" placeholder="搜索"><input id="hz" name="hz_id" type="hidden"></input>
                <button class="btn" type="button" onclick="filter('wholesale')"><i class="icon-search"></i>搜索</button>
                <span class="help-inline alert">支持空格查询,如:名称 + 度数</span>
            </div>
        </td>
</tr>
<tr>
    <td class="tRight">选择的产品：</td>
        <td class="tLeft">
            <table id="chosed_product" class="table table-bordered table-striped">
                <thead><tr><th>条码</th><th>名称</th> <th>规格</th> <th>价格备注</th><th>售价</th><th>数量</th><th>单位</th><th>库存</th><th>生产批号</th><th>截止有效期</th><th>删除</th></tr></thead>
            </table>
        </td>
</tr>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />

<tr>
	<td></td>
	<td class="center" width="300">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<a class="btn btn-primary offset1" href="__URL__"><i class="icon-arrow-left icon-white"></i>返回</a>
	</td>
</tr>
</table>
</form>
</div>
</div>

<include file="Public:footer"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
